<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>


	<?php 
		//print_r ($this->input->post());
		
		echo form_fieldset('Ubah data pendaftaran ITB Senior Programming Contest 2011',array('class' => 'form'));
		
		echo form_open('spc/validasi',array('class' => 'inline'));
		//$req= "<span id='req'> * </span>";
		$req = '';
		echo form_label('Nama tim'.$req.'<span id="reg_rule"> minimal 4 karakter, maksimal 20 karakter.</span>','spc_nama_tim');
		echo form_error('spc_nama_tim');
		echo form_input('spc_nama_tim',
			(($this->input->post("spc_nama_tim")=='')?$userdata->spc_nama_tim:$this->input->post("spc_nama_tim")));
		
		echo form_label('Nama perguruan tinggi'.$req,'spc_nama_pt');
		echo form_error('spc_nama_pt');
		echo form_input('spc_nama_pt', 
			(($this->input->post("spc_nama_pt")=='')?$userdata->spc_nama_pt:$this->input->post("spc_nama_pt")));
		
		echo form_label('Alamat perguruan tinggi'.$req,'spc_alamat_pt');
		echo form_error('spc_alamat_pt');
		echo form_textarea('spc_alamat_pt', 
			(($this->input->post("spc_alamat_pt")=='')?$userdata->spc_alamat_pt:$this->input->post("spc_alamat_pt")));
		
		echo form_label('Nama lengkap anggota tim #1 (ketua tim)'.$req,'spc_nama_1');
		echo form_error('spc_nama_1');
		echo form_input('spc_nama_1',  
			(($this->input->post("spc_nama_1")=='')?$userdata->spc_nama_1:$this->input->post("spc_nama_1")));
		
		echo form_label('Nomor ponsel ketua tim'.$req,'spc_nohp');
		echo form_error('spc_nohp');
		echo form_input('spc_nohp',  
			(($this->input->post("spc_nohp")=='')?$userdata->spc_nohp:$this->input->post("spc_nohp")));
		
		echo form_label('Alamat email ketua tim'.$req,'spc_email');
		echo form_error('spc_email');
		echo form_input('spc_email',  
			(($this->input->post("spc_email")=='')?$userdata->spc_email:$this->input->post("spc_email")));
				
		echo form_label('Nama lengkap anggota tim #2','spc_nama_2');
		echo form_error('spc_nama_2');
		echo form_input('spc_nama_2',  
			(($this->input->post("spc_nama_2")=='')?$userdata->spc_nama_2:$this->input->post("spc_nama_2")));
		
		echo form_label('Nama lengkap anggota tim #3','spc_nama_3');
		echo form_error('spc_nama_3');
		echo form_input('spc_nama_3',  
			(($this->input->post("spc_nama_3")=='')?$userdata->spc_nama_3:$this->input->post("spc_nama_3")));
		
		echo form_label('Nama lengkap dosen pembimbing','spc_pembimbing');
		echo form_error('spc_pembimbing');
		echo form_input('spc_pembimbing', 
			(($this->input->post("spc_pembimbing")=='')?$userdata->spc_pembimbing:$this->input->post("spc_pembimbing")));
		
		echo form_fieldset('Ubah password (optional)',array('class' => 'passchange'));
		echo form_label('Masukkan password lama anda','old_password');
		echo form_error('old_password');
		echo form_password('old_password');
		
		echo form_label('Masukkan password baru yang diinginkan','new_password');
		echo form_error('new_password');
		echo form_password('new_password');
		
		echo form_label('Konfirmasi password baru yang diinginkan','new_password_2');
		echo form_error('new_password_2');
		echo form_password('new_password_2');
	
		echo form_fieldset_close(); 
		
		
		echo '<br/>';
		
		echo form_submit(array(
				'name' => 'data_valid',
				'class' => 'edit')
				, 'Ubah data pendaftaran');
		echo form_close();
	
		echo form_open('spc/index',array('class' => 'inline'));
		echo form_submit(array(
				'name' => 'action',
				'class' => 'button_n')
				, 'Kembali');
		echo form_close();
		
		echo form_fieldset_close(); 
	
	?>